<template>
  <div class="headnav" :style="{backgroundImage:'url('+top+')'}">
    <div class="picon-l"  >
      <div @click="aafn" v-if="isBack!=false">
        <i class="mintui mintui-back"></i>
      </div>
      
    </div>
    <div class="title"><!--{{headtitle}}--></div>
    <!-- 右侧按钮 -->
    <div class="picon-r">
      <!-- <i class="mintui mintui-more"></i> -->
    </div>


  </div>
</template>
<script>
import api from '@/api/api';
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      aaa: "/",
      top:""
    };
  },
    props:["isBack"],
  computed: {
    ...mapGetters({
      headtitle: "get_title"
    })
  },
  methods: {
    aafn() {
      if(this.$router.history.current.name=='RapRight'){
        this.$router.go(-3); //返回上3层
      }else{
        this.$router.go(-1); //返回上一层
      }
      
    }
  },
  created() {
    // this.headtitle = this.$router.history.current.meta.title
    console.log(this.$router.history.current.name,'head');
    
    
  },
  mounted(){
    let that = this;
    api.getSysConfig(that,sysres=>{
      let sysdata = sysres.data.data;
      that.top = that.host.filehost + sysdata.TOPIMG[0].ID;
      console.log(that.top,"===========aaaaaaaaa");
    })
  }
};
</script>
<style scoped lang="less">
// .fonticon {
//   padding: 0.05rem 0 0.12rem 0;
// }
// .mint-header.is-fixed {
//   z-index: 9;
// }
// .mint-header {
//   background-color: #ffffff;
//   color: #333333;
//   background-image: url("../../assets/img/headnav.jpg");
//   background-size: 100% 100%;
// }

.headnav {
  height: 48px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  background-size: cover;
  background-position: right center;
  z-index: 9;
  .picon-l {
    color: #ffffff;
  }
  .picon-l,
  .picon-r {
    height: 48px;
    width: 48px;
    line-height: 48px;
    text-align: center;
  }
  .title {
    flex: 100%;
    text-align: center;
    font-weight: bold;
    color: rgb(255, 255, 255);
  }
}
</style>


